package com.better517na.stateprocess.run;

import com.better517na.stateprocess.model.OrderInfo;
import com.better517na.stateprocess.model.OrderStateEvent;
import com.better517na.stateprocess.model.ServiceResult;

/** * 状态机执行引擎 */
public interface OrderFsmEngine {
    /**     * 执行状态迁移事件，不传FsmOrder默认会根据orderId从FsmOrderService接口获取     */
    <T> ServiceResult<T> sendEvent(OrderStateEvent orderStateEvent) throws Exception;
    /**     * 执行状态迁移事件，可携带FsmOrder参数     */
    <T> ServiceResult<T> sendEvent(OrderStateEvent orderStateEvent, OrderInfo fsmOrder) throws Exception;}

